#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
int main()
{
	long long n;
	scanf("%lld", &n);
	printf("%lld ", n);

	while (n)
	{
		n /= 2;
		printf("%lld ", n);
	}
	return 0;
}